package com.hu.common.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author hu
 * @since 2023-09-07
 */
@Data
@ApiModel(value = "Blog对象", description = "")
public class Blog implements Serializable {

    private static final long serialVersionUID = 1L;
    public static final String VIEW_PREFIX = "ARTICLE_READ_COUNT_ID";

      @ApiModelProperty("id")
        @TableId(value = "id", type = IdType.AUTO)
      private Integer id;

      @ApiModelProperty("标题")
      private String title;

      @ApiModelProperty("内容")
      private String content;

      @ApiModelProperty("时间")
      @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
      private String time;

      @ApiModelProperty("点赞数")
      private Integer praise;

      @ApiModelProperty("封面")
      private String img;

      @ApiModelProperty("描述")
      private String description;

      @ApiModelProperty("阅读数")
      private Integer readCount;

      @ApiModelProperty("评论数")
      private Integer commentCount;

      @ApiModelProperty("作者id")
      private String authorId;

      @ApiModelProperty("作者姓名")
      private String authorName;

      @ApiModelProperty("作者头像")
      private String authorAvatar;
}
